function login() {
    var usernameUI = document.getElementById("username");
    var denglukuang = document.getElementById("denglukuang");
    var iamge = document.getElementById("image");
    if (usernameUI.value.length < 5) {
        denglukuang.className = "loginError";
        iamge.src = "./11000001.png";
        return;
    } else {
        denglukuang.className = "loginOk";
    }
    let obj = new Object();
    obj.name = usernameUI.value;
    obj.pswd = document.getElementById("pswdinput").value;
    let jieguo = JSON.stringify(obj);
    console.log(jieguo);
    fetch("https://study.godoai.com/api/user/login/" + obj.name + "/" + obj.pswd)
    .then(resp => resp.json())
    .then(result => {
        console.log(result);
        alert("欢迎你:" + result.Data.Name);
    });
}